<template>
  <div class="main">
    <div class="banner">
      <img src="../assets/images/gsjj-banner.png" alt="" />
    </div>
    <div class="center">
      <div class="head">
        <h1>{{ serviceDetailData.title }}</h1>
        <p>{{ serviceDetailData.create_time }}</p>
      </div>
      <div class="body" v-html="serviceDetailData.content"></div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      serviceDetailData: []
    }
  },
  created () {
    const id = this.$route.query.id
    this.$http.getServiceDetail(id).then((res) => {
      if (res.data.code === 0) {
        this.serviceDetailData = res.data.data
      } else {
        this.$message.error('请求失败，请重试！')
      }
    })
  }
}
</script>

<style lang="scss" scoped>
.banner {
  max-width: 1920px;
  height: 700px;
  position: relative;
  img {
    height: 100%;
    width: 100%;
  }
}
.center {
  max-width: 1200px;
  margin: 0 auto;
  font-family: PingFang SC;
  padding: 50px 0;
  .head {
    h1 {
      font-size: 48px;
      font-weight: bold;
      line-height: 30px;
      color: #333333;
    }
    p {
      font-size: 24px;
      font-weight: 400;
      line-height: 33px;
      color: #999999;
      margin-top: 40px;
    }
  }
  .body {
    margin-top: 80px;
    padding-top: 70px;
    border-top: 1px solid #999999;
    font-size: 24px;
    font-weight: 400;
    line-height: 33px;
    color: #999999;
  }
}
</style>
